<?php (!defined('IN_SYSTEM') || !defined('ADMIN_PRE')) && exit('Access Denied!');?>
{admintemplate header}
<div class="box">
 	<div class="heading">
		<h1>页面管理</h1>
	<div class="buttons">
	<a href="<?php echo url('admin.php?m=page&f=create')?>" >创建页面</a>
	</div>	
	</div>
	<div class="main">
		<form name="op" method="post" action="?m=page">
		<table cellspacing="0" class="list" id="list">
		<thead>
			<tr>
				<td width="1"><input type="checkbox" name="chkall2" value="1" class="checkbox" onclick="check_all(this)" /></td>
				<td width="40">ID</td>
				<td class="left">页面名称</td>
				<td width="300">URL别名</td>
				<td width="80" class="center">是否显示</td>
				<td width="80" class="center">排序</td>
				<td width="150" class="center">创建时间</td>
				<td width="40">操作</td>
			</tr>
		</thead>
		<tbody>
			<?php
			if ( count($result) ) {
				foreach ( $result as $row ) {
			?>
			<tr id="row_<?php echo $row['id'];?>">
				<td class="center"><input type="checkbox" name="id[]" value="<?php echo $row['id']?>" class="checkbox" /></td>
				<td class="center"><?php echo $row['id']?></td>
				<td class="left"><a href="?m=page&f=edit&id=<?php echo $row['id']?>" title="编辑这个页面"><?php echo $row['title']?></a></td>
				<td><a href="<?php echo $row['urlname']?>" target="_blank"><?php echo $row['urlname']?></a>&nbsp;</td>
				<td class="center"><?php echo ($row['ishide'] ? '<span style="color:red">否</span>' : '<span style="color:green">是</span>')?></td>
				<td class="center"><?php echo $row['orderid']?></td>
				<td class="center"><?php echo gdate('Y-m-d H:i', $row['dateline'])?></td>
				<td><a href="{url index.php?m=page&f=index&id=$row[id]}" target="_blank">查看</a>&nbsp;</td>
			</tr>
			<?php }?>
				<tr>
					<td><input type="checkbox" name="chkall2" value="1" class="checkbox" onclick="check_all(this)" /></td>
					<td class="center"><label for="chkall">全选</label></td>
					<td colspan="6"><?php pager($num,$pagesize,$page,$url)?>
					<input type="radio" name="f" value="delete" id="delete" class="radio" /><label for="delete">删除</label>
					<input type="radio" name="f" value="display" id="display" class="radio"  /><label for="display">显示</label>
					<input type="radio" name="f" value="hide" id="hide" class="radio"  /><label for="hide">隐藏</label>
					<input type="submit" class="button" value="执行操作"  />
					</td>
				</tr>
			<?php
			} else {
				echo '<tr><td colspan="10">当前还没有页面</td></tr>';
			}
			?>
		</tbody>		
		</table>
		</form>
	</div>
</div>
{admintemplate footer}